Merged
Conversation
perazz
commented
Feb 11, 2025
Member
|
Nice. Thank you @perazz
I prefer I will review the PR ASAP, but looks already good to me. |
Contributor
I think |
jvdp1
approved these changes
Feb 11, 2025
Member
Author
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
…nto string_utilities
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
jalvesz
requested changes
Feb 11, 2025
Contributor
jalvesz
left a comment
There was a problem hiding this comment.
I saw in several places that you use cmd to refer to the output of the string manipulation. Would it be possible to use one of res, out or str ? I think cmd signals an explicit use of commands, but these implementations are much more generic than that.
jalvesz
reviewed
Feb 13, 2025
Co-authored-by: jalvesz <102541118+jalvesz@users.noreply.github.com>
jalvesz
approved these changes
Feb 14, 2025
Contributor
|
LGTM @perazz! Great addition, no further comments on my side :) |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is spun off #911 for clarity.
Add two string utilities:
joinresult = join(strings [, separator])character(*)ortype(string_type)arrays.This simplifies string concatenation for command construction and formatted output.
to_c_charresult = to_c_char(value)Converts a Fortran string to a null-terminated C character array (
c_char), enabling interoperability with C libraries that require C-style strings.character(*)ortype(string_type)variables.to_string. maybe we should considerto_c_char? orc_charto mimic the internalcharinterface?cc: @jvdp1 @jalvesz @fortran-lang/stdlib